﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CrmWorkflowDependencies.Dependencies
{
    public class VertexProperty : Vertex
    {
        public Vertex Parent { get; set; }

        public VertexProperty(Vertex parent, object alias, string label = null) : base(alias.ToString(), label) {
            Parent = parent;
            Type = componenttype.Attribute;
        }

        public override bool Equals(object obj)
        {
            VertexProperty vp = obj as VertexProperty;
            return base.Equals(obj) && obj is VertexProperty && vp.Parent != null && this.Parent != null && vp.Parent.Equals(this.Parent);

        }
    }
}
